<?php
//控制基类   继承Smarty模版类
class Controller extends Smarty
{
	public function __conssruct()
	{
		//模板配置
		$this->setTemplateDir('./views')
		     ->setCompileDir('./runtime/view_c')
		     ->setConfigDir('./configs')
		     ->setCacheDir('./runtime/caches');
		$this->left_delimiter = "<{";
		$this->right_delimiter = "}>";
		//配置缓存
		$this->caching = false;//关闭缓存
		$this->cache_lifetime = 10;//缓存10秒

	}
	public function __call($fun,$params)
	{
	//调用不存在的方法 返回404
	header('HTTP/1.0 404 not found');
	header('Status: 404 not found');//ie
	echo '<h1>404 NOT FOUND!!!</h1>';
	}
}
